Conditions | 1 |
Paths | 1 |
Total Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | var chai = require('chai'); |
||
9 | describe('Url', function() { |
||
10 | |||
11 | var urls = fse.readJsonSync(path.join(__dirname, 'fixtures', 'string', 'urls.json'), 'utf8') |
||
12 | |||
13 | /** |
||
14 | * getAbeImport |
||
15 | * |
||
16 | */ |
||
17 | it('configuration file', function() { |
||
18 | for(var key in urls){ |
||
|
|||
19 | chai.assert.equal(coreUtils.slug.clean(key), urls[key] + config.files.templates.extension, key + 'slugified url did not match') |
||
20 | } |
||
21 | }); |
||
22 | |||
23 | }); |
||
24 |
When iterating over the keys of an object, this includes not only the keys of the object, but also keys contained in the prototype of that object. It is generally a best practice to check for these keys specifically: